package com.shengqiang.cloud.ups.dao.modal;

import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.IdType;

import java.io.Serializable;

@TableName("upms_user")
public class UpmsUser implements Serializable {
    /**
     * 编号
     *
     * @mbg.generated
     */
    @TableField("id")
    @TableId(type = IdType.AUTO)
    private int id;

    /**
     * 帐号
     *
     * @mbg.generated
     */
    @TableField("username")
    private String username;

    /**
     * 密码MD5(密码+盐)
     *
     * @mbg.generated
     */
    @TableField("password")
    private String password;

    /**
     * 盐
     *
     * @mbg.generated
     */
    @TableField("salt")
    private String salt;

    /**
     * 姓名
     *
     * @mbg.generated
     */
    @TableField("realname")
    private String realname;

    /**
     * 头像
     *
     * @mbg.generated
     */
    @TableField("avatar")
    private String avatar;

    /**
     * 电话
     *
     * @mbg.generated
     */
    @TableField("phone")
    private String phone;

    /**
     * 邮箱
     *
     * @mbg.generated
     */
    @TableField("email")
    private String email;

    /**
     * 性别
     *
     * @mbg.generated
     */
    @TableField("sex")
    private Byte sex;

    /**
     * 状态(0:正常,1:锁定)
     *
     * @mbg.generated
     */
    @TableField("locked")
    private Byte locked;

    /**
     * 创建时间
     *
     * @mbg.generated
     */
    @TableField("ctime")
    private Long ctime;

    /**
     * 部门Id
     */
    @TableField("deptId")
    private int deptId;

    private static final long serialVersionUID = 1L;

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getSalt() {
        return salt;
    }

    public void setSalt(String salt) {
        this.salt = salt;
    }

    public String getRealname() {
        return realname;
    }

    public void setRealname(String realname) {
        this.realname = realname;
    }

    public String getAvatar() {
        return avatar;
    }

    public void setAvatar(String avatar) {
        this.avatar = avatar;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public Byte getSex() {
        return sex;
    }

    public void setSex(Byte sex) {
        this.sex = sex;
    }

    public Byte getLocked() {
        return locked;
    }

    public void setLocked(Byte locked) {
        this.locked = locked;
    }

    public Long getCtime() {
        return ctime;
    }

    public void setCtime(Long ctime) {
        this.ctime = ctime;
    }

    public int getDeptId() {
        return deptId;
    }

    public void setDeptId(int deptId) {
        this.deptId = deptId;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", userId=").append(id);
        sb.append(", username=").append(username);
        sb.append(", password=").append(password);
        sb.append(", salt=").append(salt);
        sb.append(", realname=").append(realname);
        sb.append(", avatar=").append(avatar);
        sb.append(", phone=").append(phone);
        sb.append(", email=").append(email);
        sb.append(", sex=").append(sex);
        sb.append(", locked=").append(locked);
        sb.append(", ctime=").append(ctime);
        sb.append("]");
        return sb.toString();
    }

}